package test_achieve.web;

import constant.Constant;
import cucumber.api.java.en.Given;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;

/**
 * Created by chenkuo on 2017/10/22.
 */
public class Oneself {

    @Given("^w进入在线下单界面$")
    public void w进入在线下单界面() {
        Constant.driverWeb.findElement(By.linkText("在线下单")).click();
    }

    @Given("^w切换城市：(.+)$")
    public void w切换城市(String city) throws Throwable {
        city = city == null ? "北京市" : city;
        OrderMain webmain = new OrderMain();
        webmain.wSwitchCity(city);
        webmain.wVerifyCitySwitch(city);
    }

}
